from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import redis
from flask_wtf.csrf import CSRFProtect
from flask_session import Session
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from config import Config
app = Flask(__name__)





app.config.from_object(Config)
SQLAlchemy(app)
redis_store = redis.StrictRedis(host=Config.redis_host, port=Config.redis_port)
CSRFProtect(app)
Session(app)
manger = Manager(app)
manger.add_command("db", MigrateCommand)

@app.route('/')
def hello_world():
    return 'Hello World!'


if __name__ == '__main__':
    manger.run()
